package com.qf.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.qf.mapper.DtsOrderMapper;
import com.qf.pojo.DtsOrder;
import com.qf.service.OrderService;
import com.qf.vo.DayStatis;
import com.qf.vo.OrderAmtsVo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author 邢式瑞
 * @version 1.0
 * @project E-commercebackGroundManagementSystem
 * @date 2022/9/21 10:39
 */
@Service
public class OrderServiceImpl implements OrderService {
    @Autowired
    private DtsOrderMapper orderMapper;
    @Override
    public long selectCount() {
        return orderMapper.selectCount( new QueryWrapper<DtsOrder>().eq("deleted", false));
    }

    @Override
    public List<DayStatis> findOrderAmts(int statisDayRange) {

       return  orderMapper.selectOrderAmts(statisDayRange);

    }
}
